package com.rhb.mail.mail.dao;

import java.util.List;

import com.rhb.mail.mail.bean.*;

public interface MailDAO {
	public String create(Mail obj);
	public void update(Mail obj);
	public void erase(Mail obj);
	public void delete(Mail obj);
	public Mail findByPK(String pk);
	
	public List findMailsByFatherPk(String pk);

	public List findByQuery(MailQuery query,int start, int count);
	public int getAllCount_findByQuery(MailQuery query);
	
	public List findSentMailByQuery(MailQuery query,int start, int count);
	public int getAllCount_findSentMailByQuery(MailQuery query);

	public List findReceivedMailByQuery(MailQuery query,int start, int count);
	public int getAllCount_findReceivedMailByQuery(MailQuery query);

	public List findUnreadMailByQuery(MailQuery query,int start, int count);
	public int getAllCount_findUnreadMailByQuery(MailQuery query);

	public List findDeletedReceivedMailByQuery(MailQuery query,int start, int count);
	public int getAllCount_findDeletedReceivedMailByQuery(MailQuery query);
	
	public List findDeletedSentMailByQuery(MailQuery query,int start, int count);
	public int getAllCount_findDeletedSentMailByQuery(MailQuery query);

}
